package com.gmail.fanvaron.Listener;

import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;

import com.gmail.fanvaron.Main.MarvMonsterPack;


public class BlockBreakListener implements Listener {

	public MarvMonsterPack plugin;

	public BlockBreakListener(MarvMonsterPack instance) {
		plugin = instance;
	}

	@EventHandler
	public void onBlockBreak(BlockBreakEvent event) {
		Block b = event.getBlock();
		Player p = event.getPlayer();

		if (p.isOp() || b.getType().equals(Material.GRAVEL)) {
			return;
		}
		event.setCancelled(true);

	}
}
